<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>客户详情</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <!--编辑器-->
    <link rel="stylesheet" href="/css/froala_editor.min.css" />
    <link rel="stylesheet" href="/css/froala_editor.pkgd.min.css" />
    <link rel="stylesheet" href="/css/customerManager/customerDetail.css"/>
    <script th:inline="javascript">
        var customer = [[${customer}]];
        var memberStatus = [[${membershipExpirationTm}]];
        console.log(customer, memberStatus);
    </script>
    <style>
        #productExchangeModal h4{
            font-size: 18px;
            font-family: PingFang SC;
            font-weight: 500;
            color: #2A2E35;
        }
        #productExchangeModal .closeBtn{
            font-size: 23px;
            font-family: MicrosoftYaHei;
            font-weight: bold;
            color: #000000;
            opacity: 0.2;
        }
        /*清除浮动*/
        .clearFix:after{
            content: "";
            display: block;
            height: 0;
            clear:both;
            visibility: hidden;
            zoom:1;
        }
        #productExchangeModal .new-tabs li:after{
            width:100%;
        }
        .chooseRule{
            height: 36px;
            line-height:36px;
            background: #F0F4F8;
            border: 1px solid #EDF1F8;
            border-radius: 4px;
            padding-left:15px;
            margin-bottom:20px;
        }
        .warning{
            height:46px;
            line-height:46px;
            background: #FDF8E3;
            border: 1px solid #FBEDD0;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 400;
            color: #9C6E2A;
            padding-left:20px;
            margin:15px 0 30px 0;
        }
        .warning .warnTitle{
            font-size: 16px;
            font-weight: 500;
            color: #735019;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="card customer-card">
        <div class="card-header">
            <h1>客户详情</h1>
            <div class="pull-left">(客户编号：<span th:text="${customer?.customerNumber}"></span>)</div>
            <div class="card-actions pull-right">
                <button class="btn btn-link" id="editInfo" data-toggle="modal" data-target="#editInfoModal" style="background: #4460f1;color: #FFFFFF;">编辑 <i class="mdi mdi-tune"></i></button>
                <button type="button" class="btn btn-label btn-default" id="backBtn"><label><i class="mdi mdi-keyboard-backspace"></i></label>返回我的客户列表</button>
            </div>
        </div>
        <div class="card-body" id="infoCard">
            <div id="info">
                <div class="customer-logo">
                    <div class="logo">
                        <a href="#!" id="editLogo" data-toggle="modal" data-target="#editLogoModal"><img id="newsPic0" th:src="@{(${customer?.accessUrl})}"/><span>修改</span></a>
                    </div>
                </div>
                <div class="customer-info">
                    <div class="title">
                        <h3 th:text="${customer?.customerName}" class="customer-name"></h3>
                        <span class="stock-code" th:if="${customer?.identification} ne null" >股票代码：<strong th:text="${customer?.identification}"></strong></span>
                        <!--<div class="code">
                            <a href="#!"><i class="mdi mdi-qrcode"></i></a>
                            <div class="code-box"><img src="" alt=""></div>
                        </div>-->
                        <!-- 判断是否有到期时间字段内容 -->
                        <span class="vip" th:if="${membershipExpirationTm} eq null">VIP <strong th:text="${customer?.membershipLevel}"></strong></span>
                        <span class="vip" th:if="${membershipExpirationTm} ne null" data-toggle="tooltip" data-placement="top" th:data-original-title="'会员到期时间：' + ${membershipExpirationTm}">VIP <strong th:text="${customer?.membershipLevel}"></strong></span>
                        <div class="credit">（社会信用统一代码：<span th:text="${customer?.unifiedSocialCreditCode}"></span>）</div>
                    </div>
                    <div class="score">
                        <button type="button" class="btn btn-sm btn-info pull-left m-r-15" data-toggle="modal" data-target="#usedNameModal" th:if="${customer?.customerType} == '0'">曾用名及企业关联</button>
                        <h5>客户评分：</h5>
                        <input type="hidden" id="scoreId" th:value="${customer?.customerRating}">
                        <span id="showScore" data-number="5" class="starbox"></span>
                    </div>
                    <ul class="general">
                        <li th:text="${companySize}" data-toggle="tooltip" data-placement="top" data-original-title="公司规模"></li>
                        <li th:text="${companyType}" data-toggle="tooltip" data-placement="top" data-original-title="公司类型"></li>
                        <li th:text="${industry}" data-toggle="tooltip" data-placement="top" data-original-title="公司行业"></li>
                        <li>财务人数：<span th:text="${customer?.financialNumber}"></span></li>
                    </ul>
                    <div class="tabs-box">
                        <input type="text" name="tagName" data-role="tagsinput" placeholder="输入标签，回车确认" th:value="${customer?.tag}" id="tag" class="tagsinput">
                    </div>
                </div>
                <div class="collapse in" aria-expanded="false" id="moreInfo">
                    <div class="well form-well">
                        <div class="title">基本信息</div>
                        <div class="row">
                            <div class="col-xs-4">
                                <label>法定法人：</label>
                                <span class="text" th:text="${customer?.legalRepresentative ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>注册资本：</label>
                                <span class="text" th:text="${registeredCapital ?: '暂无'}"></span>
                                <span th:if="${registeredCapital != null && registeredCapital != '' && not #strings.contains(registeredCapital,'元')}">万元</span>
                            </div>
                            <div class="col-xs-4">
                                <label>注册时间：</label>
                                <span class="text" th:text="${registrationDate ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>联系人：</label>
                                <span class="text" th:text="${customer?.contactPerson ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>联系方式：</label>
                                <span class="text" th:text="${customer?.contactPersonPhone ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>公司电话：</label>
                                <span class="text" th:text="${customer?.enterpriseExternalPhone ?: '暂无'}"></span>
                                <button class="tel-button" onclick="callCenter(this, 1);" th:if="${customer.enterpriseExternalPhone} ne ''"><i class="mdi mdi-phone"></i></button>
                            </div>
                            <div class="col-xs-4">
                                <label>公司网址：</label>
                                <span class="text" th:text="${customer?.companyWebsite ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>传真：</label>
                                <span class="text" th:text="${customer?.fax ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>邮箱：</label>
                                <span class="text" th:text="${customer?.email ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>客户ID：</label>
                                <span class="text" th:text="${customer?.originalCustomerId ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-4">
                                <label>客户类型：</label>
                                <!--<span class="text" th:text="${customer?.customerType ?: '暂无'} ? '个人客户' : '企业客户'"></span>-->
                                <span class="text" th:if="${customer?.customerType} == '0'">企业客户</span>
                                <span class="text" th:if="${customer?.customerType} == '1'">个人客户</span>
                            </div>
                            <div class="col-xs-4">
                                <label>参保人数：</label>
                                <span class="text" th:text="${customer?.insuredNumber ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-12">
                                <label>更多电话：</label>
                                <span class="text" th:text="${customer?.enterpriseExternalLandline ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-12">
                                <label>所在地区：</label>
                                <span class="text" th:if="${(customer.provinceName == null || customer.provinceName == '') && (customer.cityName == null || customer.cityName == '') && (customer.countyName == null || customer.countyName == '')}">暂无</span>
                                <span class="text" th:if="${customer.provinceName != null && customer.provinceName != ''}" th:text="${customer.provinceName}"></span>
                                <span class="text" th:if="${customer.cityName != null && customer.cityName != ''}" th:text="${' - ' + customer.cityName}"></span>
                                <span class="text" th:if="${customer.countyName != null && customer.countyName != ''}" th:text="${' - ' + customer.countyName}"></span>
                                <!--<span class="text" th:if="${not #strings.isEmpty(customer.cityName)}" th:text="${customer.cityName ?: '暂无'}"></span>-->
                            </div>
                            <div class="col-xs-12">
                                <label>公司地址：</label>
                                <span class="text" th:text="${customer?.detailedAddress ?: '暂无'}"></span>
                            </div>
                            <div class="col-xs-12">
                                <label>备注：</label>
                                <span class="text" th:text="${customer?.remark ?: '暂无'}"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="collapse-btn">
                    <a href="#!" id="btnCollapse" data-toggle="collapse" data-target="#moreInfo" aria-expanded="false" aria-controls="moreInfo">点击收起 <i class="mdi mdi-chevron-double-up"></i></a>
                </div>
            </div>
        </div>
    </div>
    <div class="card">
        <input type="hidden" id="hrefType" name="hrefType" th:value="${hrefType}"/>
        <ul class="nav nav-tabs tabs-lg" role="tablist">
            <li class="active" onclick="contactListc('1')"><a href="#contactList" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">联系人名录</a></li>
            <li class="" onclick="companyInformationc('0');companyInfo();"><a href="#companyInformation" aria-controls="" role="tab" data-toggle="tab" aria-expanded="true">公司资料</a></li>
            <li class="" onclick="productc()"><a href="#product" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">产品明细</a></li>
            <li class="" onclick="contractc();orderc();"><a href="#contract" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">合同&订单</a></li>
            <!--<li class="" onclick="orderc()"><a href="#order" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">订单</a></li>-->
            <!--<li class="" onclick="exchange()"><a href="#exchange" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">兑换</a></li>-->
            <li class="" onclick="followUpRecordc();visitRecordc();"><a href="#followUpRecord" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">跟进&拜访</a></li>
            <!--<li class="" onclick="visitRecordc()"><a href="#visitRecord" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">拜访记录</a></li>-->
            <!--<li class="" onclick="demandAnalysisListc()"><a href="#demandAnalysisList" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">需求分析</a></li>-->
            <!--<li class="" onclick="competitorListc()"><a href="#competitorList" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">竞品列表</a></li>-->
            <li class="" onclick="opportunityListc()"><a href="#opportunityListBox" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">商机列表</a></li>
            <!--onclick="workLogListc()"-->
            <li class="" onclick="workLog()"><a href="#workLogListc" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">工作日志</a></li>
            <li class="" onclick="nxContact()"><a href="#nxContactListc" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">内训联系人</a></li>
            <li class="" onclick="cardc()"><a href="#cardListc" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">会员卡</a></li>
            <li class="" onclick="taxCardc()"><a href="#taxCardListc" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">税法直通车</a></li>
            <li class="" onclick="coupon()"><a href="#couponListc" aria-controls="" role="tab" data-toggle="tab" aria-expanded="false">优惠券</a></li>
        </ul>
        <div class="tab-content">
            <!-- 联系人名录 -->
            <div role="tabpanel" id="contactList" class="tab-pane active">
                <div class="row m-b-10">
                    <div class="col-xs-4">
                        <button type="button" class="btn btn-success btn-label" onclick="addCustomerContactPerson()">
                            <label><i class="mdi mdi-plus"></i></label>新增联系人</button>
                    </div>
                    <div class="col-xs-8">
                        <label class="lyear-checkbox pull-right m-t-10">
                            <input type="checkbox" id="abolishState" checked>
                            <span>不显示废止联系人</span>
                        </label>
                    </div>
                </div>
                <table id="contactListDetail"></table>
            </div>
            <!-- 公司资料 -->
            <div role="tabpanel" id="companyInformation" class="tab-pane">
                <span id="customerPoolId" class="hidden" th:text="${customer?.customerPoolId}"></span>
                <span id="customerId" class="hidden" th:text="${customer?.customerId}"></span>
                <div class="row company-info">
                    <div class="col-xs-4">
                        <div class="well">
                            <img src="/images/company-info-1.png" alt="">
                            <p>公司收益：<span id="companyIncome"></span></p>
                            <p>公司数量：<span id="companyNumber"></span></p>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <div class="well">
                            <img src="/images/company-info-2.png" alt="">
                            <p>产品服务：<span id="productServiceNumber"></span></p>
                            <p>融资情况：<span id="financingSituation"></span></p>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <div class="well">
                            <img src="/images/company-info-3.png" alt="">
                            <p>上游公司<span id="upstreamCompany"></span></p>
                            <p>下游公司<span id="downstreamCompany"></span></p>
                        </div>
                    </div>
                </div>
                <div class="well form-well">
                    <h3>公司简介<button class="btn btn-link btn-sm" data-toggle="modal" data-target="#editCompanyInfoModal" id="editCompanyInfo" onclick="companyInfo(1);">编辑 <i class="mdi mdi-tune"></i></button></h3>
                    <div id="companyProfile" class="company-profile"></div>
                </div>
                <div class="well form-well">
                    <h3>高管名单</h3>
                    <table id="custDetail"></table>
                </div>
            </div>
            <!-- 产品明细 -->
            <div role="tabpanel" id="product" class="tab-pane">
                <div class="well form-well">
                    <h3>会员产品</h3>
                    <table id="memberFinishOrderProductDetail"></table>
                </div>
                <div class="well form-well">
                    <h3>非会员产品</h3>
                    <table id="nonMemberFinishOrderProductDetail"></table>
                </div>
                <div class="well form-well">
                    <h3>兑换产品</h3>
                    <table id="redeemProductsTableDetail"></table>
                </div>
            </div>
            <!-- 合同&订单 -->
            <div role="tabpanel" id="contract" class="tab-pane">
                <!--<ul class="subtabs clearFix m-b-15">
                    <li class="active"><a href="#tabContract" role="tab" data-toggle="tab" aria-expanded="true" onclick="contractc();">合同</a></li>
                    <li><a href="#tabOrder" role="tab" data-toggle="tab" aria-expanded="false" onclick="orderc();">订单</a></li>
                </ul>-->
                <div class="well form-well" id="tabContract">
                    <h3>合同</h3>
                    <div class="clearfix m-b-10 info-box">
                        <button type="button" class="btn btn-success btn-label" onclick="addContract();"><label><i class="mdi mdi-plus"></i></label>创建合同</button>
                        <div class="pull-right">
                            <div class="pull-left">账户余额：<span th:text="${customer?.customerWallet ?: '0'}"></span></div>
                            <div class="pull-left">转入额：<span th:text="${customer?.customerShiftWallet ?: '0'}"></span></div>
                        </div>
                    </div>
                    <table id="contractDetail"></table>
                </div>
                <div class="well form-well" id="tabOrder">
                    <h3>订单</h3>
                    <table id="orderDetail"></table>
                </div>
            </div>
            <!-- 兑换 -->
            <div role="tabpanel" id="exchange" class="tab-pane">
                <p>
                    <button type="button" class="btn btn-success btn-label"
                            onclick="addExchange()"><label><i class="mdi mdi-plus"></i></label>新增兑换
                    </button>
                </p>
                <table id="exchangeDetail"></table>
            </div>
            <!-- 跟进&拜访记录 -->
            <div role="tabpanel" id="followUpRecord" class="tab-pane">
                <div class="well form-well">
                    <h3>跟进记录</h3>
                    <table id="followUpRecordDetail"></table>
                </div>
                <div class="well form-well">
                    <h3>拜访记录</h3>
                    <table id="visitRecordDetail"></table>
                </div>
            </div>
            <!-- 商机列表 -->
            <div role="tabpanel" id="opportunityListBox" class="tab-pane">
                <p>
                    <button type="button" class="btn btn-success btn-label"
                            onclick="addOpportunity()"><label><i class="mdi mdi-plus"></i></label>新增商机
                    </button>
                </p>
                <table id="opportunityListDetail"></table>
            </div>
            <!-- 工作日志 -->
            <div role="tabpanel" id="workLogListc" class="tab-pane">
                <!--<p>
                    onclick="addworkLogListc()"
                    <button type="button" class="btn btn-success btn-label"
                            onclick="addContacts()"
                            ><label><i class="mdi mdi-plus"></i></label>新增工作日志
                    </button>
                </p>-->
                <table id="userWorkList" class="userWorkList"></table>
            </div>
            <!--内训联系人-->
            <div role="tabpanel" id="nxContactListc" class="tab-pane">
                <table id="nxContactList"></table>
            </div>
            <!--会员卡-->
            <div role="tabpanel" id="cardListc" class="tab-pane">
                <table id="cardList"></table>
            </div>
            <!--税法直通车-->
            <div role="tabpanel" id="taxCardListc" class="tab-pane">
                <table id="taxCardList"></table>
            </div>
            <!--优惠券-->
            <div role="tabpanel" id="couponListc" class="tab-pane">
                <table id="couponList"></table>
            </div>
        </div>
    </div>
</div>
<!-- 修改logo -->
<div class="modal fade" id="editLogoModal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="topEdit">
                <div class="img-box">
                    <img id="newsPic" th:src="@{(${customer.accessUrl})}">
                    <div id="imageId" class="hidden" th:text="${customer?.uploadId}"></div>
                </div>
                <label for="files">
                    <span class="btn btn-default btn-label"><label><i class="mdi mdi-upload"></i></label>上传图片</span>
                    <input type="file" id="files" onchange="getNewsPicUpload(this)" class="hide">
                </label>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="baseInfo('1')">保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 编辑客户详情 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="editInfoModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel">修改信息</h4>
            </div>
            <div class="modal-body">
                <form id="editInfoForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <!--<div class="col-xs-4">
                            <div class="logo">
                                <div id="imageId" class="hidden"></div>
                                <a href="JavaScript:void(0);" class="delete-head"><i class="mdi mdi-close"></i></a>
                                <div class="logo-box">
                                    <img id="newsPic">
                                </div>
                                <label>
                                    <input type="file" id="files" onchange="getNewsPicUpload(this)" class="hidden">
                                    <span><i class="mdi mdi-upload"></i>上传图片</span>
                                </label>
                            </div>
                        </div>
                        <div class="col-xs-8">
                            <label class="control-label " for="">客户名称</label>
                            <div class="form-group">
                                <input type="text" name="" id="customerName" class="form-control" placeholder="请输入客户名称" disabled>
                            </div>
                        </div>
                        <div class="col-xs-8">
                            <label class="control-label label-required" for="">标签</label>
                            <div class="form-group">
                                <input type="text" name="tagName" data-role="tagsinput" placeholder="输入标签，回车确认" id="tag" class="form-control tagsinput">
                            </div>
                        </div>
                        <div class="col-xs-12">&nbsp;</div>
                        <div class="col-xs-4">
                            <label class="control-label label-required" for="">客户类型</label>
                            <div class="form-group">
                                <input type="text" name="customerType" id="customerType" class="form-control" placeholder="请输入客户类型" maxlength="4" >
                            </div>
                        </div>-->
                        <div class="col-xs-4 contact-people">
                            <label class="control-label" for="">联系人</label>
                            <div class="form-group">
                                <input name="" id="contactPerson" type="text" class="form-control" placeholder="请输入联系人姓名" maxlength="10">
                            </div>
                        </div>
                        <div class="col-xs-4 contact-people">
                            <label class="control-label" for="">联系方式</label>
                            <div class="form-group">
                                <input name="" id="contactPersonPhone" type="text" class="form-control" placeholder="请输入联系方式" maxlength="11" onkeyup="value = value.replace(/[^\w\.\/]/ig,'')">
                            </div>
                        </div>
                        <!--<div class="col-xs-4">
                            <label class="control-label label-required" for="">客户编号</label>
                            <div class="form-group">
                                <input type="text" name="customerNumber" id="customerNumber" class="form-control" placeholder="请输入客户编号">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">客户ID</label>
                            <div class="form-group">
                                <input type="text" id="originalCustomerId" class="form-control" placeholder="请输入原客户ID">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label " for="">社会信用统一代码</label>
                            <div class="form-group">
                                <input type="text" name="" id="unifiedSocialCreditCode" class="form-control"
                                       placeholder="请输入统一社会信用代码" disabled>
                            </div>
                        </div>-->
                        <div class="col-xs-4">
                            <label class="control-label" for="">公司类型</label>
                            <div class="form-group">
                                <select name="" id="companyType" class="form-control" title="请选择">
                                    <option value="1">有限责任公司</option>
                                    <option value="2">股份有限公司</option>
                                    <option value="3">集体所有制</option>
                                    <option value="4">国有企业</option>
                                    <option value="5">个体工商户</option>
                                    <option value="6">个人独资企业</option>
                                    <option value="7">有限合伙</option>
                                    <option value="8">普通合伙</option>
                                    <option value="9">外商独资企业</option>
                                    <option value="10">港澳台</option>
                                    <option value="11">联营企业</option>
                                    <option value="12">私营企业</option>
                                    <option value="13">企业</option>
                                    <option value="14">事业单位</option>
                                    <option value="15">基金会</option>
                                    <option value="16">社会组织</option>
                                    <option value="17">律所</option>
                                    <option value="18">香港特别行政区企业</option>
                                    <option value="19">台湾省企业</option>
                                    <option value="20">独资企业</option>
                                    <option value="21">国企</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
<!--                            label-required-->
                            <label class="control-label " for="">行业分类</label>
                            <div class="form-group">
                                <select th:id="industryx" class="form-control" id="industryx" type="text" title="请选择">
                                    <option value="">请选择行业</option>
                                    <option value="农、林、牧、渔业">农、林、牧、渔业</option>
                                    <option value="采矿业">采矿业</option>
                                    <option value="制造业">制造业</option>
                                    <option value="电力、热力、燃气及水生产和供应业">电力、热力、燃气及水生产和供应业</option>
                                    <option value="建筑业">建筑业</option>
                                    <option value="有色金属冶炼和压延加工业">有色金属冶炼和压延加工业</option>
                                    <option value="批发和零售业">批发和零售业</option>
                                    <option value="交通运输、仓储和邮政业">交通运输、仓储和邮政业</option>
                                    <option value="住宿和餐饮业">住宿和餐饮业</option>
                                    <option value="信息传输、软件和信息技术服务业">信息传输、软件和信息技术服务业</option>
                                    <option value="金融业">金融业</option>
                                    <option value="房地产业">房地产业</option>
                                    <option value="租赁和商务服务业">租赁和商务服务业</option>
                                    <option value="科学研究和技术服务业">科学研究和技术服务业</option>
                                    <option value="水利、环境和公共设施管理业">水利、环境和公共设施管理业</option>
                                    <option value="居民服务、修理和其他服务业">居民服务、修理和其他服务业</option>
                                    <option value="教育">教育</option>
                                    <option value="卫生和社会工作">卫生和社会工作</option>
                                    <option value="文化、体育和娱乐业">文化、体育和娱乐业</option>
                                    <option value="公共管理、社会保障和社会组织">公共管理、社会保障和社会组织</option>
                                    <option value="国际组织">国际组织</option>
                                    <option value="个人客户">个人客户</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">法定代表人</label>
                            <div class="form-group">
                                <input type="text" th:value="${customer?.legalRepresentative}" id="legalRepresentative" class="form-control" placeholder="请输入法定代表人" maxlength="10">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">公司规模</label>
                            <div class="form-group">
                                <select name="" id="companySize" class="form-control" type="text" title="请选择">
                                    <option value="1">0-20人</option>
                                    <option value="2">20-99人</option>
                                    <option value="3">100-499人</option>
                                    <option value="4">500-999人</option>
                                    <option value="5">1000-9999人</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">注册资本</label>
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" name="" id="registeredCapital" class="form-control">
                                    <span class="input-group-addon">万</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">财务人数</label>
                            <div class="form-group">
                                <input type="text" name="" id="financialNumber" class="form-control" onkeyup="value = value.replace(/[^\w\.\/]/ig,'')" placeholder="请输入财务人数">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">企业对外座机</label>
                            <div class="form-group">
                                <input type="text" id="enterpriseExternalLandline" name="" placeholder="请输入企业对外座机" class="form-control" maxlength="15">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">公司网址</label>
                            <div class="form-group">
                                <input type="text" id="companyWebsite" placeholder="请输入公司网址" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">注册时间</label>
                            <div class="form-group">
                                <input type="text" name="" id="registrationTime" class="form-control" placeholder="请输入注册时间">
                            </div>
                        </div>
                        <!--<div class="col-xs-4">
                            <label class="control-label" for="">传真</label>
                            <div class="form-group">
                                <input type="text" id="fax" class="form-control" placeholder="请输入传真">
                            </div>
                        </div>-->
                        <div class="col-xs-4">
                            <label class="control-label" for="">邮箱</label>
                            <div class="form-group">
                                <input type="text" name="" id="email" class="form-control" placeholder="请输入邮箱">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">所在地区(省)</label>
                            <div class="form-group">
                                <select onchange="changeProvince()" id="editProvince" name="editProvince" class="form-control" type="text" data-live-search="true"></select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">市</label>
                            <div class="form-group">
                                <select onchange="changeCity()" id="editCity" name="editCity" class="form-control" type="text" data-live-search="true"></select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label" for="">区/县</label>
                            <div class="form-group">
                                <select id="editCounty" name="editCounty" class="form-control" type="text" data-live-search="true"></select>
                            </div>
                        </div>
                        <div class="col-xs-8">
                            <label class="control-label" for="">公司地址</label>
                            <div class="form-group">
                                <input type="text" name="" id="address" class="form-control" placeholder="请输入公司详细地址" maxlength="50">
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label" for="">备注</label>
                            <div class="form-group">
                                <textarea type="text" rows="2" id="remark" class="form-control" maxlength="300"></textarea>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="baseInfo();">保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 编辑公司详情 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="editCompanyInfoModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">编辑公司详情</h4>
            </div>
            <div class="modal-body">
                <form id="editCompanyForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-xs-4">
                            <label class="control-label label-required">公司收益</label>
                            <div class="form-group">
                                <input name="companyIncomeE" id="companyIncomeE" type="text" class="form-control" placeholder="请输入公司收益">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">公司数量</label>
                            <div class="form-group">
                                <input name="companyNumberE" id="companyNumberE" type="text" class="form-control" placeholder="请输入公司数量">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">产品服务</label>
                            <div class="form-group">
                                <input name="productServiceNumberE" id="productServiceNumberE" type="text" class="form-control" placeholder="请输入产品服务数量">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">融资情况</label>
                            <div class="form-group">
                                <input name="financingSituationE" id="financingSituationE" type="text" class="form-control" placeholder="请输入融资情况">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">上游公司</label>
                            <div class="form-group">
                                <input name="upstreamCompanyE" id="upstreamCompanyE" type="text" class="form-control" placeholder="请输入上游公司">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">下游公司</label>
                            <div class="form-group">
                                <input name="downstreamCompanyE" id="downstreamCompanyE" type="text" class="form-control" placeholder="请输入下游公司">
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label label-required">公司简介</label>
                            <div class="form-group">
                                <textarea rows="8" name="companyProfileE" id="companyProfileE" class="form-control"></textarea>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="saveCompany();">保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 新增联系人 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addModel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增联系人</h4>
            </div>
            <div class="modal-body" style="min-height: 200px;">
                <form id="addContactForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-xs-4">
                            <label class="control-label label-required">联系人姓名</label>
                            <div class="form-group">
                                <input name="contactNameAdd" id="contactNameAdd" type="text" class="form-control" placeholder="请输入联系人姓名">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">联系方式</label>
                            <div class="form-group">
                                <!--<input name="contactInformationAdd" maxlength="20" id="contactInformationAdd" type="text" class="form-control"
                                       placeholder="请输入联系方式">-->
                                <div class="input-group">
                                    <input name="contactInformationAdd" maxlength="12" id="contactInformationAdd" type="text" class="form-control"
                                           placeholder="请输入联系方式"  oninput="value=value.replace(/[^\d]/g,'')">
                                    <span class="input-group-addon">-</span>
                                    <div class="input-group-btn">
                                        <input type="text" placeholder="分机号" id="extNumber" class="form-control" style="width: 70px;">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label ">联系类型</label>
                            <div class="form-group">
                                <select name="contactType" class="form-control" id="contactType" type="text" title="请选择">
                                    <option value="家庭电话">家庭电话</option>
                                    <option value="爱人电话">爱人电话</option>
                                    <option value="单位电话">单位电话</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4 qt_a" style="display: none;">
                            <label class="control-label ">其他联系类型</label>
                            <div class="form-group">
                                <input type="text" id="contactTypeQt" name="contactTypeQt" placeholder="请输入其他联系类型"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label ">联系人类型</label>
                            <div class="form-group">
                                <select name="contactState" class="form-control" id="contactState" type="text" title="请选择">
                                    <option value="1">主联系人</option>
                                    <option value="2">从联系人</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label ">联系方式类型</label>
                            <div class="form-group">
                                <select name="contactInformationType" class="form-control" id="contactInformationType" type="text" title="请选择">
                                    <option value="0">主联系方式</option>
                                    <option value="1">从联系方式</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label ">职务</label>
                            <div class="form-group">
                                <input type="text" placeholder="请输入或选择职务名称" id="contactPositionAdd" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="form-control">
                                <ul class="dropdown-menu">
                                    <li><a href="#!">财务副总裁/财务总经理</a></li>
                                    <li><a href="#!">财务总监/总会计师</a></li>
                                    <li><a href="#!">审计及证券</a></li>
                                    <li><a href="#!">财务经理/财务处长/财务部长</a></li>
                                    <li><a href="#!">财务主管/财务科长</a></li>
                                    <li><a href="#!">办公室及人资</a></li>
                                    <li><a href="#!">会计及出纳</a></li>
                                </ul>
                                <!--<select name="contactPositionAdd" class="form-control" id="contactPositionAdd" type="text" title="请选择">
                                    <option value="0">公司管理</option>
                                    <option value="1">财务</option>
                                    <option value="2">人力</option>
                                    <option value="3">其他</option>
                                </select>-->
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">职务状态</label>
                            <div class="form-group">
                                <select name="" class="form-control" id="isSeniorExecutive" type="text" title="请选择">
                                    <option value="0">高管</option>
                                    <option value="1">非高管</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">在职情况</label>
                            <div class="form-group">
                                <select name="" class="form-control" id="onTheJobSituationAdd" type="text" title="请选择">
                                    <option value="0">在职</option>
                                    <option value="1">离职</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">行业</label>
                            <div class="form-group">
                                <select name="" class="form-control" id="industry" title="请选择">
                                    <option value="农、林、牧、渔业">农、林、牧、渔业</option>
                                    <option value="采矿业">采矿业</option>
                                    <option value="制造业">制造业</option>
                                    <option value="电力、热力、燃气及水生产和供应业">电力、热力、燃气及水生产和供应业</option>
                                    <option value="建筑业">建筑业</option>
                                    <option value="有色金属冶炼和压延加工业">有色金属冶炼和压延加工业</option>
                                    <option value="批发和零售业">批发和零售业</option>
                                    <option value="交通运输、仓储和邮政业">交通运输、仓储和邮政业</option>
                                    <option value="住宿和餐饮业">住宿和餐饮业</option>
                                    <option value="信息传输、软件和信息技术服务业">信息传输、软件和信息技术服务业</option>
                                    <option value="金融业">金融业</option>
                                    <option value="房地产业">房地产业</option>
                                    <option value="租赁和商务服务业">租赁和商务服务业</option>
                                    <option value="科学研究和技术服务业">科学研究和技术服务业</option>
                                    <option value="水利、环境和公共设施管理业">水利、环境和公共设施管理业</option>
                                    <option value="居民服务、修理和其他服务业">居民服务、修理和其他服务业</option>
                                    <option value="教育">教育</option>
                                    <option value="卫生和社会工作">卫生和社会工作</option>
                                    <option value="文化、体育和娱乐业">文化、体育和娱乐业</option>
                                    <option value="公共管理、社会保障和社会组织">公共管理、社会保障和社会组织</option>
                                    <option value="国际组织">国际组织</option>
                                    <option value="个人客户">个人客户</option>
                                    <option value="其他">其他</option>
                                </select>
                                <!--<input maxlength="20" id="industry" type="text" class="form-control" placeholder="请输入行业">-->
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">微信</label>
                            <div class="form-group">
                                <input name="" type="text" id="wxAdd" class="form-control" placeholder="请输入微信">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">邮箱</label>
                            <div class="form-group">
                                <input name="mailBoxAdd" id="mailBoxAdd" type="text" class="form-control"
                                       placeholder="请输入邮箱">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label ">目前意向</label>
                            <div class="form-group">
                                <select name="currentIntention" class="form-control" id="currentIntention" title="请选择">
                                    <option value="0">有意向</option>
                                    <option value="1">无意向</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-8">
                            <label class="control-label ">所在地区</label>
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-xs-6">
                                        <select name="province" title="请选择" id="province" class="form-control" onchange="changeCityLxr();"></select>
                                    </div>
                                    <div class="col-xs-6">
                                        <select name="city" title="请选择" id="city" class="form-control"></select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label ">公司地址</label>
                            <div class="form-group">
                                <input name="companyAddress" type="text" id="companyAddress" class="form-control" placeholder="请输入公司地址">
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label">家庭住址</label>
                            <div class="form-group">
                                <input name="" id="homeAddress" type="text" class="form-control">
                            </div>
                        </div>
                        <!--<div class="col-xs-12">
                            <label class="control-label">专用电话</label>
                            <div>
                                <select class="form-control" id="privateTelephone" type="text" title="请选择">
                                    <option value="">请选择</option>
                                    <option value="0">非专用电话</option>
                                    <option value="1">专用电话</option>
                                </select>
                            </div>
                        </div>-->
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="saveCustomerContactPerson();">保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 联系人姓名去重 -->
<div class="modal fade" tabindex="-1" role="dialog" id="duplicateContacts">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">联系人重名</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 60px;">
                <div class="alert alert-warning">您输入的联系人姓名已存在，如需 <strong>合并</strong> 请在下拉框选择一条合并，如果不是同名联系人，可以不做选择直接点击确定即可新增联系人。</div>
                <div class="row">
                    <div class="col-xs-8 col-xs-offset-2">
                        <select class="form-control" id="duplicateContact" title="请选择"></select>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="addDuplicateContactBtn">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 修改联系人 -->
<div class="modal fade" tabindex="-1" role="dialog" id="editModel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">修改联系人</h4>
            </div>
            <div class="modal-body">
                <form id="edditContactForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-xs-6">
                            <label class="control-label">姓名</label>
                            <div class="form-group">
                                <input id="contactName" type="text" class="form-control" disabled="disabled">
                                <input id="customerContactPersonId" type="hidden">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">联系方式</label>
                            <div class="form-group">
                                <input maxlength="20" id="contactInformation" type="text" class="form-control" disabled="disabled">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">职务</label>
                            <div class="form-group">
                                <input type="text" placeholder="请输入或选择职务名称" id="contactPosition" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="form-control">
                                <ul class="dropdown-menu">
                                    <li><a href="#!">财务副总裁/财务总经理</a></li>
                                    <li><a href="#!">财务总监/总会计师</a></li>
                                    <li><a href="#!">审计及证券</a></li>
                                    <li><a href="#!">财务经理/财务处长/财务部长</a></li>
                                    <li><a href="#!">财务主管/财务科长</a></li>
                                    <li><a href="#!">办公室及人资</a></li>
                                    <li><a href="#!">会计及出纳</a></li>
                                </ul>
                                <!--<select name="contactPosition" class="form-control" id="contactPosition" type="text" title="请选择">
                                    <option value="0">公司管理</option>
                                    <option value="1">财务</option>
                                    <option value="2">人力</option>
                                    <option value="3">其他</option>
                                </select>-->
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">在职情况</label>
                            <div class="form-group">
                                <select name="onTheJobSituation" class="form-control" id="onTheJobSituation" type="text" title="请选择">
                                    <option value="0">在职</option>
                                    <option value="1">离职</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">邮箱</label>
                            <div class="form-group">
                                <input name="mailBox" id="mailBox" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">微信</label>
                            <div class="form-group">
                                <input name="wx" id="wx" type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="updateCustomerContactPerson();">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 续费 -->
<div  id="addProductModal" class="modal fade bs-example-modal-lg" tabindex="-1" data-backdrop="static" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4>选择续费产品</h4>
            </div>
            <div class="modal-body">

                <table id="productListTable"></table>
                <div class="well form-well" style="margin-top: 20px;">
                    <h3>附加费用</h3>
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">金额</label>
                            <div class="form-content">
                                <input type="text" class="form-control" placeholder="该费用不计入业绩和提成" id="renenSurcharge" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 surcharge-remarks">
                            <label class="control-label label-required">备注</label>
                            <div class="form-content">
                                <textarea class="form-control" rows="3" placeholder="不多于100字" id="renenOrderSurchargeRemark"></textarea>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="well form-well">
                    <h2>合同金额</h2>
                    <div class="row amount-total">
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同总金额</h5>
                                <p id="renewTotalAmount">0</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同优惠总金额</h5>
                                <p id="renewDiscountAmount">0</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同实际总金额</h5>
                                <p id="renewRealAmount">0</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>应收款</h5>
                                <p id="renewReceivables">0</p>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="well form-well file-well">
                    <div class="row">

                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">客户联系人</label>
                            <div class="form-content">
                                <input type="text" name="customerContractName" placeholder="请输入联系人姓名" id="customerContractName" class="form-control">
                                <!--                                <select type="text" id="customerContractList" class="form-control" title="请选择客户联系人" data-live-search="true" ></select>-->
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">联系方式</label>
                            <div class="form-content">
                                <input type="text" name="customerContactInformation" placeholder="请输入联系方式" id="customerContactInformation" class="form-control">
                            </div>
                        </div>

                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">合同起止日期</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="renenContractDate" placeholder="请选择合同起止日期" autocomplete="off"  >
                            </div>
                        </div>

                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">支付方式</label>
                            <div class="form-content">
                                <select class="form-control" title="请选择" id="paymentMethod" name="paymentMethod">
                                    <!--<option value="1">线上支付</option>-->
                                    <option th:selected="${contract?.paymentMethod == '2'}" value="2">线下支付</option>
                                    <option th:selected="${contract?.paymentMethod == '3'}" value="3">余额支付</option>
                                    <!--<option th:selected="${contract?.paymentMethod == '4'}" value="4">转入额支付</option>
                                    <option th:selected="${contract?.paymentMethod == '5'}" value="5">余额＋转入额支付</option>-->
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">关联跟进记录</label>
                            <div class="form-content">
                                <select class="form-control" title="请选择关联跟进记录" id="followRecordList" name="followRecordList"></select>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 form-lg-content">
                            <label class="control-label label-required">关联赢单商机</label>
                            <div class="form-content">
                                <!--                            th:selected="${contract?.opportunityId}"-->
                                <select class="form-control" title="请选择关联赢单商机" id="opportunityList" name="opportunityList"></select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="well form-well file-well">
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
                            <div class="file-group form-group">
                                <h5>合同附件</h5>

                                <div class="file-box">
                                    <input type="hidden" id="contractPic" class="image-id" >
                                    <input type="file" accept=".doc,.pdf,.docx" id="contractImg" name="contractImg" class="form-control"  onchange="uploadImg('contractImg')">

                                </div>

                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 approval">
                            <div class="file-group">
                                <h5 class="label-required">合同审核</h5>
                                <div class="file-box">
                                    <input type="hidden" id="examinedPic" class="image-id">
                                    <input type="file" accept=".doc,.pdf,.docx" id="examineImgBox" name="examineImgBox" class="form-control"  onchange="uploadImg('examineImgBox')">

                                </div>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <h5 class="">备注</h5>
                            <textarea class="form-control" placeholder="请输入备注" id="renewContractReviewNotes"></textarea>
                        </div>
                        <div class="col-xs-12">
                        </div>
                    </div>
                </div>
                <div class="well form-well form-cooperate" id="cooperateWell" style="display: none;">
                    <h3>合作开发人员</h3>
                    <div id="cooperateTableToolbar" class="toolbar">
                        <select name="companiesList" id="companiesList" title="请选择分公司" data-live-search="true" onchange="getAccountList(this);" class="pull-left m-r-10"></select>
                        <select name="accountList" id="accountList" title="请选择合作开发人员" data-live-search="true" class="pull-left m-r-10" disabled></select>
                        <button type="button" class="btn btn-success btn-label" id="addCooperateBtn" disabled onclick="addCooperate();"><label><i class="mdi mdi-plus"></i></label>添加</button>
                    </div>
                    <table id="cooperateTable"></table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="addRenewContract()">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 新增需求分析 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addDemandAnalysisModel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增需求分析</h4>
            </div>
            <div class="modal-body">
                <form id="demandAnalysisForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-xs-4">
                            <label class="control-label label-required">需求分析名称</label>
                            <div class="form-group">
                                <input name="demandAnalysisName" id="demandAnalysisName" type="text" class="form-control" placeholder="请输入需求分析名称" maxlength="20">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">解决方案</label>
                            <div class="form-group">
                                <input name="solution" id="solution" type="text" class="form-control" placeholder="请输入解决方案" maxlength="60">
                            </div>
                        </div>
                        <!--<div class="col-xs-4">
                            <label class="control-label label-required">需求</label>
                            <div class="form-group">
                                <select name="demandType" class="form-control" id="demandType" title="请选择">
                                    <option value="0">产品</option>
                                    <option value="1">会员</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">负责人</label>
                            <div class="form-group">
                                <input name="director" id="director" type="text" class="form-control" placeholder="请输入负责人">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">联系方式</label>
                            <div class="form-group">
                                <input name="contactInformationxq" maxlength="20" id="contactInformationxq" type="text" class="form-control"
                                       placeholder="请输入联系方式">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">职务</label>
                            <div class="form-group">
                                <input name="position" maxlength="20" id="position" type="text" class="form-control"
                                       placeholder="请输入职务">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">预算</label>
                            <div class="form-group">
                                <input name="budget" id="budget" type="text" class="form-control" placeholder="请输入预算" maxlength="32" onkeyup="value = value.replace(/[^\w\.\/]/ig,'')">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">预算时间</label>
                            <div class="form-group">
                                <input name="budgetTime" id="budgetTime" type="text" class="form-control" placeholder="请输入预算时间">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">资金年收入</label>
                            <div class="form-group">
                                <input name="" maxlength="32" id="annualCapitalIncome" type="text" class="form-control" onkeyup="value = value.replace(/[^\w\.\/]/ig,'')"
                                       placeholder="请输入资金年收入">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">目前竞品</label>
                            <div class="form-group">
                                <input name="" maxlength="20" id="presentCompetitor" type="text" class="form-control"
                                       placeholder="请输入目前竞品">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">竞品到期时间</label>
                            <div class="form-group">
                                <input name="" id="competitorDueTime" type="text" class="form-control" placeholder="请输入竞品到期时间">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">目前方案</label>
                            <div class="form-group">
                                <input name="" maxlength="20" id="currentProgram" type="text" class="form-control"
                                       placeholder="请输入目前方案">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label label-required">购买意向</label>
                            <div class="form-group">
                                <input name="purchaseIntention" maxlength="20" id="purchaseIntention" type="text" class="form-control"
                                       placeholder="请输入购买意向">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <label class="control-label">财年目标</label>
                            <div class="form-group">
                                <input name="" maxlength="20" id="fiscalYearTarget" type="text" class="form-control"
                                       placeholder="请输入财年目标">
                            </div>
                        </div>-->
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="saveDemandAnalysis();">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 新增竞品 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addCompetitorModel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增竞品</h4>
            </div>
            <div class="modal-body">
                <form id="competitorForm" autocomplete="off">
                    <div class="well form-well">
                        <h3>竞品信息</h3>
                        <div class="row">
                            <div class="col-xs-4">
                                <label class="control-label label-required">竞品名称</label>
                                <div class="form-group">
                                    <input name="competitorName" id="competitorName" type="text" class="form-control" placeholder="请输入竞品名称" maxlength="20">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label">竞品价格</label>
                                <div class="form-group">
                                    <input name="" id="competitorPrice" type="text" class="form-control"
                                           placeholder="请输入竞品价格" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label">竞品单位</label>
                                <div class="form-group">
                                    <input name="" maxlength="20" id="competitorUnit" type="text" class="form-control"
                                           placeholder="请输入竞品单位">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label">竞品到期时间</label>
                                <div class="form-group">
                                    <input name="" id="competitorDueTimej" type="text" class="form-control" placeholder="请输入竞品到期时间">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="well form-well">
                        <h3>产品信息</h3>
                        <div class="row">
                            <div class="col-xs-4">
                                <label class="control-label label-required">产品名称</label>
                                <div class="form-group">
                                    <input name="productName" id="productName" type="text" class="form-control" placeholder="请输入产品名称" maxlength="20">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label">产品价格</label>
                                <div class="form-group">
                                    <input name="" id="productPrice" type="text" class="form-control"
                                           placeholder="请输入产品价格" maxlength="20"  onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label">当前预算</label>
                                <div class="form-group">
                                    <input name="" id="currentBudget" type="text" class="form-control"
                                           placeholder="请输入当前预算" maxlength="20"  onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label label-required">预算负责人</label>
                                <div class="form-group">
                                    <!--<input name="budgetDirector" maxlength="10" id="budgetDirector" type="text" class="form-control"
                                           placeholder="请输入预算负责人">-->
                                    <input onclick="changeName();" id="budgetDirector" name="budgetDirector" type="text" class="form-control" placeholder="请输入预算负责人" autocomplete="off">
                                    <ul id="nameBox" class="dropdown-menu"></ul>
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <label class="control-label label-required">负责人联系方式</label>
                                <div class="form-group">
                                    <!--<input name="directorInformation" id="directorInformation" type="text" class="form-control"
                                           placeholder="请输入负责人联系方式" maxlength="11" onkeyup="value = value.replace(/[^\w\.\/]/ig,'')">-->
                                    <input id="directorInformation" type="text" name="directorInformation" class="form-control" placeholder="请输入联系人电话"  oninput="value=value.replace(/[^\d]/g,'')">
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="saveCompetitor();">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 会员产品-兑换产品 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="productExchangeModal" data-backdrop="false" aria-labelledby="productExchangeModal" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header" style="padding-bottom:0">
                <i class="mdi mdi-close pull-right closeBtn" onclick="closeProductExhange()"></i>
            </div>
            <div style="display: flex;justify-content: center;">
                <ul class="new-tabs" style="padding:0 20px;width:262px">
                    <li class="nav-item active">
                        <a href="#memberCardExchange" id="memberCardExchangeNav" data-toggle="tab" onclick="exchangeWay('memberCardExchange')">会员卡权益兑换</a>
                    </li>
                    <li class="nav-item" style="margin-right:0">
                        <a href="#memberExchange" id="memberExchangeNav" data-toggle="tab" onclick="exchangeWay('memberExchange')">会员权益兑换</a>
                    </li>
                </ul>
            </div>
            <div class="modal-body clearFix">
                <main class="tab-content">
                    <div role="tabpanel" id="memberCardExchange" class="tab-pane active">
                        <ul class="new-tabs">
                            <!-- 现场参会 行业会  高端班-->
                            <li class="nav-item active">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="daysRule" onclick="changeRule('days',this)">现场参会</a>
                            </li>
                            <li class="nav-item">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="communicateRule" onclick="changeRule('communicate',this)">行业会</a>
                            </li>
                            <li class="nav-item">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="productRule" onclick="changeRule('product',this)">高端班</a>
                            </li>
                        </ul>
<!--                        <div class="tab-content">-->
<!--                            <div class="chooseRule">选择规则</div>-->
<!--                            &lt;!&ndash; 规则列表 &ndash;&gt;-->
<!--                            <table id="ruleTable"></table>-->
<!--                        </div>-->
                    </div>
                    <div role="tabpanel" id="memberExchange" class="tab-pane">
                        <ul class="new-tabs">
                            <!-- 高端班兑换天数 现场天数兑换行业会次数 行业会次数兑换现场天数-->
                            <li class="nav-item">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="courseExchangeDays" onclick="changeRule('courseExchangeDays',this)">高端班兑换现场天数</a>
                            </li>
                            <li class="nav-item">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="daysExchangeCommunication" onclick="changeRule('daysExchangeCommunication',this)">现场天数兑换行业会次数</a>
                            </li>
                            <li class="nav-item">
                                <a href="#" data-toggle="tab" aria-expanded="false" id="communicationExchangeDays" onclick="changeRule('communicationExchangeDays',this)">行业会次数兑换现场天数</a>
                            </li>
                        </ul>
<!--                        <div class="tab-content">-->
<!--                            <div class="chooseRule">选择规则</div>-->
<!--                            &lt;!&ndash; 规则列表 &ndash;&gt;-->
<!--                            <table id="ruleTable1"></table>-->
<!--                        </div>-->
                    </div>
                    <div class="tab-content">
                        <div class="chooseRule">选择规则</div>
                        <!-- 规则列表 -->
                        <table id="ruleTable"></table>
                    </div>
                </main>

                <div class="formContainer">
                    <div class="file-group form-group" style="display:flex">
                        <label class="control-label label-required" style="line-height:40px">附件</label>
                        <div class="file-box" style="width:calc(100% - 50px);margin-left:6px">
                            <input type="hidden" id="exchangeContractPic" class="image-id" >
                            <input type="file" accept=".doc,.pdf,.docx" id="exchangeContractImg" name="exchangeContractImg" class="form-control"  onchange="uploadImgExchange()">
                        </div>
                    </div>
                </div>
                <div class="warning">
                    <span class="warnTitle">说明:</span>
                    <span class="warnText">会员卡兑换,一经操作确认不可取消,如不慎点击,产生相应后果由操作人自行承担!</span>
                </div>
                <div id='btnsContainer' class="pull-right" style="margin-bottom:30px">
                    <div class="btn btn-default"style="margin-right: 20px;" onclick="reset()">重置</div>
                    <div class="btn btn-primary" onclick="submitRule()" >确认</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 产品详细信息 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="productInfo">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">产品详细信息</h4>
            </div>
            <div class="modal-body">
                <div class="well form-well">
                    <h3>会员卡信息</h3>
                    <div id="cardInfolist">
<!--                        <div class="card-info clearfix" id="cardInfo">-->
<!--                            <div class="code" id="cardCode"></div>-->
<!--                            <div class="pull-left">-->
<!--                                <h5>卡号：<span id="cardNum"></span></h5>-->
<!--                                <p>密码：<span id="cardPassword">*********</span></p>-->
<!--                                <p>有效期：<span id="cardDays">****.**.** 至 ****.**.**</span></p>-->
<!--                            </div>-->
<!--                            <div class="btn-box" id="carInfoBox">-->
<!--                                <p><span>暂无会员卡，请点击按钮申请会员卡</span></p>-->
<!--                                <button type="button" class="btn btn-primary" id="applyCard">申请会员卡</button>-->
<!--                            </div>-->
<!--                        </div>-->

                    </div>

                </div>
                <div class="well form-well">
                    <h3>税法直通车信息</h3>
                    <div id="taxLawCardInfoList">
<!--                        <div class="card-info clearfix" id="taxLawCardInfo" style="height: 100px">-->
<!--                            <div class="pull-left">-->
<!--                                <h5>卡号：<span id="taxLawCardNum"></span></h5>-->
<!--                                <p>密码：<span id="taxLawCardPassword">*********</span></p>-->
<!--                            </div>-->
<!--                            <div class="btn-box">-->
<!--                            </div>-->
<!--                        </div>-->
                    </div>

                </div>
                <div class="well form-well">
                    <h3>兑换码信息</h3>
                    <div id="exchangeCardInfoBox">

                    </div>
<!--                    <div class="card-info clearfix" id="exchangeCardInfo"  style="height: 100px">-->
<!--                        <div class="pull-left">-->
<!--                            <h5>卡号：<span id="exchangeCardNum"></span></h5>-->
<!--                            <p>密码：<span id="exchangeCardPassword">*********</span></p>-->
<!--                        </div>-->
<!--                        <div class="btn-box">-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="well form-well">
                    <h3>云顾问卡信息</h3>
                    <div id="cloudAdvisorCardInfoBox">

                    </div>
<!--                    <div class="card-info clearfix" id="cloudAdvisorCardInfo"  style="height: 100px">-->
<!--                        <div class="pull-left">-->
<!--                            <h5>卡号：<span id="cloudAdvisorCardNum"></span></h5>-->
<!--                            <p>密码：<span id="cloudAdvisorCardPassword">*********</span></p>-->
<!--                        </div>-->
<!--                        <div class="btn-box">-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="well form-well">
                    <h3>充值卡信息</h3>
                    <div id="rechargeCardInfoBox"></div>
<!--                    <div class="card-info clearfix" id="rechargeCardInfo"  style="height: 100px">-->
<!--                        <div class="pull-left">-->
<!--                            <h5>卡号：<span id="rechargeCardNum"></span></h5>-->
<!--                            <p>密码：<span id="rechargeCardPassword">*********</span></p>-->
<!--                        </div>-->
<!--                        <div class="btn-box">-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="well form-well">
                    <h3>优惠券信息</h3>
                    <div id="couponsCardInfoBox"></div>
<!--                    <div class="card-info clearfix" id="couponsCardInfo"  style="height: 100px">-->
<!--                        <div class="pull-left">-->
<!--                            <h5>优惠卷码：<span id="couponsCardNum"></span></h5>-->
<!--                            <p>优惠券名称：<span id="couponsCardPassword">*********</span></p>-->
<!--                        </div>-->
<!--                        <div class="btn-box">-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="well form-well isShow">
                    <h3>线上课程</h3>
                    <table id="onlineCourse"></table>
                </div>
                <div class="well form-well isShow">
                    <h3>线下课程</h3>
                    <table id="offlineCourse"></table>
                </div>
                <div class="well form-well isShow">
                    <h3>增值服务</h3>
                    <table id="valueAddedServices"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<!--修改商机-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="updateOpportunityModel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-body" style="min-height: 200px;">
                <!-- start -->
                <h4 style="line-height: 40px;font-size: 14px;font-weight: bold;">修改商机</h4>
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">商机标题</label>
                        <div class="col-sm-4">
                            <input id="opportunityTitleEdit" type="text" class="form-control" placeholder="请输入商机标题">
                            <input id="opportunityId" type="hidden">
                        </div>
                        <label class="col-sm-2 control-label">产品名称</label>
                        <div class="col-sm-4">
                            <select class="form-control" id="customerProductIdEdit" type="text" title="请选择"
                                    data-live-search="true">
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">商机主题</label>
                        <div class="col-sm-4">
                            <input maxlength="20" id="opportunityThemeEdit" type="text" class="form-control"
                                   placeholder="请输入商机主题">
                        </div>
                        <label class="col-sm-2 control-label">客户联系人</label>
                        <div class="col-sm-4">
                            <select class="form-control" id="contactIdEdit" type="text" title="请选择"
                                    data-live-search="true">
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">商机联系人</label>
                        <div class="col-sm-4 " style="display: flex;">
                            <input maxlength="20" id="opportunityContactEdit" type="text" class="form-control"
                                   placeholder="请输入商机联系人">
                        </div>
                        <label class="col-sm-2 control-label">商机状态</label>
                        <div class="col-sm-4">
                            <select class="form-control" id="opportunityStatusEdit" type="text" title="请选择商机状态"
                                    data-live-search="true">
                                <option value="1">初步洽谈</option>
                                <option value="2">需求确定</option>
                                <option value="3">方案报价</option>
                                <option value="4">谈判</option>
                                <option value="5">洽谈合同</option>
                                <option value="6">赢单</option>
                                <option value="7">输单</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">输单友商</label>
                        <div class="col-sm-4">
                            <input maxlength="20" id="lostOrderFriendEdit" type="text" class="form-control"
                                   placeholder="请输入输单友商">
                        </div>
                        <label class="col-sm-2 control-label">预计签单时间</label>
                        <div class="col-sm-4">
                            <input id="estimatedSigningTimeEdit" type="text"
                                   class="form-control date-inputSjEdit" placeholder="请选择预计签单时间">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">最后跟进时间</label>
                        <div class="col-sm-4">
                            <input id="lastFollowUpTimeEdit" type="text"
                                   class="form-control date-inputSjEdit" placeholder="请选择最后跟进时间">
                        </div>
                        <label class="col-sm-2 control-label">下次跟进时间</label>
                        <div class="col-sm-4">
                            <input id="nextFollowUpTimeEdit" type="text"
                                   class="form-control date-inputSjEdit" placeholder="请选择下次跟进时间">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">预计销售金额</label>
                        <div class="col-sm-4">
                            <input id="estimatedSalesAmountEdit" type="text" class="form-control"
                                   placeholder="请输入预计销售金额"
                                   onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                        <label class="col-sm-2 control-label">签单可能性</label>
                        <div class="col-sm-4">
                            <input id="possibilitySigningEdit" type="text" class="form-control"
                                   placeholder="请输入签单可能性">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">商机类型</label>
                        <div class="col-sm-4">
                            <input  id="opportunityTypeEdit" type="text" class="form-control"
                                   placeholder="请输入商机类型">
                        </div>
                        <label class="col-sm-2 control-label">商机获取日期</label>
                        <div class="col-sm-4">
                            <input id="opportunityAcquisitionTimeEdit" type="text"
                                   class="form-control date-inputSjEdit">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">商机来源</label>
                        <div class="col-sm-4">
                            <input id="opportunitySourceEdit" type="text" class="form-control"
                                   placeholder="请输入商机来源">
                        </div>
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-4">
                            <input id="remarksEdit" type="text" class="form-control"
                                   placeholder="请输入备注">
                        </div>
                    </div>

                </form>
                <div style="width: 100%;display: flex;justify-content: center; margin-top: 30px;">
                    <div class="btn btn-primary" style="margin-right: 20px;" onclick="updateOpportunity()">确定</div>
                    <div class="btn btn-default" onclick="updateOpportunityHide()">取消</div>
                </div>
                <!-- end -->
            </div>
        </div>
    </div>
</div>

<!-- 新增兑换-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addExchangeModel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增兑换</h4>
            </div>
            <div class="modal-body">
                <form id="addExchangeForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="clearfix" style="margin-bottom: 10px">
                                <p class="pull-left" style="font-size:16px;font-weight: bold;">兑换前产品</p>
                                <div class="btn btn-primary pull-right">添加产品</div>
                            </div>
                            <table id="addBeforeExchange"></table>
                        </div>
                        <div class="col-sm-12">
                            <div class="clearfix"  style="margin-bottom: 10px">
                                <p class="pull-left" style="font-size:16px;font-weight: bold;">兑换后产品</p>
                                <div class="btn btn-primary pull-right">添加产品</div>
                            </div>
                            <table id="addAfterExchange"></table>
                        </div>
                        <div class="col-sm-12">
                            <div class="clearfix"  style="margin-bottom: 10px">
                                <p class="pull-left" style="font-size:16px;font-weight: bold;">增补金额</p>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">增补金额</label>
                                    <div class="form-group">
                                        <input name="" id="" type="text" class="form-control"
                                               placeholder="请输入增补金额">
                                    </div>
                                </div>
                                <div class="col-xs-4">
                                    <label class="control-label">附加费用（不计入业绩金额）</label>
                                    <div class="form-group">
                                        <input name="" id="" type="text" class="form-control"
                                               placeholder="请输入附加费用">
                                    </div>
                                </div>
                                <div class="col-xs-4">
                                    <label class="control-label">应收金额</label>
                                    <div class="form-group">
                                        <input name="" id="" type="text" class="form-control"
                                               placeholder="请输入应收金额">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12">
                            <div class="clearfix"  style="margin-bottom: 10px">
                                <p class="pull-left" style="font-size:16px;font-weight: bold;">提交审批</p>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="">确定</button>
            </div>
        </div>
    </div>
</div>
<!--兑换详情-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addExchangeDetails">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">兑换详情</h4>
            </div>
            <div class="modal-body">
                <form id="addExchangeDetailForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-sm-12" style="margin-bottom: 20px">
                            <p class="pull-left" style="font-size:16px;font-weight: bold;width: 100%">兑换前产品</p>
                            <div>
                                <span style="width: 50%;display: inline-block">
                                    <span>111111</span>
                                </span>
                                <span>
                                    <span>111111111</span>
                                </span>
                            </div>
                        </div>
                        <div class="col-sm-12" style="margin-bottom: 20px">
                            <p class="pull-left" style="font-size:16px;font-weight: bold;width: 100%">兑换后产品</p>
                        </div>
                        <div class="col-sm-12" style="margin-bottom: 20px">
                            <p class="pull-left" style="font-size:16px;font-weight: bold;width: 100%">增补金额</p>
                        </div>
                        <div class="col-sm-12" style="margin-bottom: 20px">
                            <p class="pull-left" style="font-size:16px;font-weight: bold;width: 100%">审核人</p>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="">确定</button>
            </div>
        </div>
    </div>
</div>

<!--兑换详情-->
<!--<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="renewDetail">
    <div class="modal-dialog modal-lg" role="document" style="width: 70%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增续费</h4>
            </div>
            <div class="modal-body">
                <form id="renewDetailForm" class="well form-well" autocomplete="off">
                    <div class="row">
                        <div class="col-sm-12" id="table" style="margin-bottom: 20px;">
                            <table id="renewTable"></table>
                        </div>
                    </div>

                <div class="well form-well" >
                    <div class="row">
                        <div class="col-sm-12" style="margin-bottom: 20px">
                            <h3>附加费用</h3>
                            <div class="row">
                                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                    <label class="control-label">金额</label>
                                    <div class="form-content">
                                        <input type="text" class="form-control" placeholder="该费用不计入业绩和提成" id="surcharge">
                                    </div>
                                </div>
                                <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12 surcharge-remarks">
                                    <label class="control-label label-required" for="orderSurchargeRemark">备注</label>
                                    <div class="form-content">
                                        <textarea class="form-control" rows="3" placeholder="不多于100字" id="orderSurchargeRemark" name="orderSurchargeRemark"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="well form-well">
                    <input type="text" id="productDiscountTotalInput" hidden>              &lt;!&ndash;产品 总金额&ndash;&gt;
                    <input type="text" id="productTotalInput" hidden>                      &lt;!&ndash;产品 计价总计&ndash;&gt;
                    <input type="text" id="examineType" value="0" hidden>                            &lt;!&ndash;判定是否需要审核 1为审核&ndash;&gt;

                    <h2>合同金额</h2>
                    <div class="row amount-total">
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同总金额</h5>
                                <p id="totalAmount">0.00</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同优惠总金额</h5>
                                <p id="discountAmount">0.00</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>合同实际总金额</h5>
                                <p id="realAmount">0.00</p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="well">
                                <h5>应收款</h5>
                                <p id="receivables">0.00</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="well form-well">
                    <div class="row">
                        <div class="form-group col-lg-5 col-md-5 col-sm-6 col-xs-12 form-group">
                            <label class="control-label label-required" for="customerContractList">客户联系人</label>
                            <div class="form-content">
                                <select type="text" id="customerContractList" class="form-control" title="请选择客户联系人" data-live-search="true" disabled name="customerContractList"></select>
                            </div>
                        </div>
                        <div class="form-group col-lg-5 col-md-6 col-sm-6 col-xs-6">
                            <label class="control-label label-required" for="contractDate">合同起止日期</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="contractDate" name="contractDate" placeholder="请选择合同起止日期" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group col-lg-5 col-md-6 col-sm-6 col-xs-6">
                            <label class="control-label label-required" for="defray">支付方式</label>
                            <div class="form-content">
                                <select class="form-control" id="defray" title="请选择支付方式" type="text" name="defray">
                                    <option value="0">线下支付</option>
                                    <option value="1">余额支付</option>
                                    <option value="2">转入额支付</option>
                                    <option value="3">余额 + 转入额支付</option>
                                </select>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="well form-well">
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
                            <div class="file-group form-group">
                                <label class="control-label label-required" for="contractImg">合同附件</label>
                                <div class="file-box">
                                    <input type="hidden" id="contractPic" class="image-id" >
                                    <input type="file" accept=".doc,.pdf,.docx" id="contractImg" name="contractImg" class="form-control"  onchange="uploadImg('contractImg')">
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-lg-3 col-md-3 col-sm-3 col-xs-12 approval">
                            <div class="file-group">
                                <h5 class="label-required" for="examineImgBox">合同审核</h5>
                                &lt;!&ndash;                            <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif,.docx,.doc" class="hidden" id="examineImg">&ndash;&gt;
                                &lt;!&ndash;                            <input type="hidden" id="examinedPic" class="image-id">&ndash;&gt;
                                &lt;!&ndash;                            <div class="img-box" id="examineImgBox"></div>&ndash;&gt;
                                &lt;!&ndash;                            <button class="btn btn-default file-browser" type="button">上传审核图片</button>&ndash;&gt;
                                <div class="file-box">
                                    <input type="hidden" id="examinedPic" class="image-id">
                                    <input type="file" accept=".doc,.pdf,.docx" id="examineImgBox" name="examineImgBox" class="form-control"  onchange="uploadImg('examineImgBox')">
                                    &lt;!&ndash;                                <input type="file" id="exfileToUpload" name="exfileToUpload" class="form-control"  onchange="fileSelected('exfileToUpload')" />&ndash;&gt;

                                </div>
                            </div>
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12 approval">
                            <h5 class="label-required" for="contractReviewNotes">审核备注</h5>
                            <textarea class="form-control" placeholder="请输入审核意见，不少于10个字" id="contractReviewNotes" name="contractReviewNotes"></textarea>
                        </div>
                    </div>
                </div>
                </form>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="renewSure()">确定</button>
            </div>
        </div>
    </div>
</div>-->

<div class="modal fade" tabindex="-1" role="dialog" id="editModels">
    <div class="modal-dialog" role="document" style="width: 80%;">
        <div class="modal-content">
            <div class="modal-header">
                <h4>修改</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" autocomplete="off">
                    <input type="hidden" id="logId">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标题</label>
                        <div class="col-sm-4">
                            <input id="workOrderTitle" type="text" class="form-control" maxlength="30" name="workOrderTitle" placeholder="请输入">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">类型</label>
                        <div class="col-sm-4">
                            <select class="form-control" id="workOrderType" type="text" placeholder="请选择" data-live-search="true" name="workOrderType">
                                <option value="">请选择</option>
                                <option value="0">无</option>
                                <option value="1">客户落实</option>
                                <option value="2">日常沟通</option>
                                <option value="3">需求挖掘</option>
                                <option value="4">会员维护</option>
                                <option value="5">促单</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <input type="hidden" class="cust-select">
                        <label class="col-sm-2 control-label">客户名称</label>
                        <div class="col-sm-4">
                            <select class="form-control customerId" id="customerIdMS"  type="text" placeholder="请选择" data-live-search="true" name="customerIdMS">

                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">描述您所述的内容</label>
                        <div class="col-sm-10">
                            <!--                        <textarea rows="8" name="workOrderContent" id="workOrderContent" class="form-control" maxlength="300"></textarea>-->
                            <div id="editor" ></div>
                            <!--                                onmouseup="show_element(event)"-->
                        </div>
                    </div>

                    <div style="margin-left: 20%;text-align: center;">
                        <!--                            onclick="saveWorkOrder()"-->
                        <button class="btn btn-primary form-group edit-submit" type="button" name="submit" style="margin-right: 30px;"
                                onclick="editSubmit()"
                        >提交
                        </button>
                        <!--                            onclick="cancelAddWorkOrder()"-->
                        <button class="btn btn-default" type="button" data-dismiss="modal">取消</button>
                    </div>


                </form>
            </div>
            <!--                <div class="modal-footer">-->
            <!--&lt;!&ndash;                    onclick="updateContact();"&ndash;&gt;-->
            <!--                    <button type="button" class="btn btn-primary" >确定</button>-->
            <!--                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>-->
            <!--                </div>-->
        </div>
    </div>
</div>

<!--曾用名及企业重复-->
<div class="modal fade show-line" tabindex="-1" role="dialog" id="usedNameModal">
    <div class="modal-dialog modal-lg" role="document" style="width: 880px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">曾用名及企业关联</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 20px;">
                <div class="row">
                    <div class="col-xs-8" style="line-height: 38px;">
                        提醒：最多只能创建三条相关数据
                    </div>
                    <div class="col-xs-4 m-b-15">
                        <button type="button" class="btn btn-success btn-label pull-right" id="addNewData"><label><i class="mdi mdi-plus"></i></label>新增数据</button>
                    </div>
                </div>
                <table id="usedNameTable"></table>
            </div>
        </div>
    </div>
</div>
<!--曾用名及企业关联 - 新增数据-->
<div class="modal fade" tabindex="-1" role="dialog" id="addNewDataModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">新增数据</h4>
            </div>
            <div class="modal-body">
                <form class="well form-well" id="addNewDataForm">
                    <div class="row">
                        <div class="col-xs-6">
                            <label class="control-label label-required">关联类型</label>
                            <div class="form-group">
                                <select name="addRelationType" id="addRelationType" class="form-control" title="请选择关联类型">
                                    <option value="0">曾用名</option>
                                    <option value="1">关联企业</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label label-required">客户名称</label>
                            <div class="form-group">
                                <input name="addCustomerName" id="addCustomerName" type="text" class="form-control" placeholder="请输入客户名称">
                            </div>
                        </div>
                        <div class="col-xs-12 addUnifiedSocialCreditCode" style="display: none;">
                            <label class="control-label label-required">社会统一信用代码</label>
                            <div class="form-group">
                                <input name="addUnifiedSocialCreditCode" id="addUnifiedSocialCreditCode" type="text" class="form-control" placeholder="请输入社会统一信用代码" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="addNewData();">添加</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="expensesRecord">
    <div class="modal-dialog modal-lg" role="document" style="width: 90%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            </div>
            <div class="modal-body">
                <iframe src="" frameborder="0" id="expensesRecordIframe"></iframe>
            </div>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<!--标签插件-->
<script type="text/javascript" src="/js/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>
<!--消息提醒-->
<script type="text/javascript" src="/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/js/crm/common/lightyear.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<!-- 评分插件 -->
<script type="text/javascript" src="/js/crm/common/raty.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<script src="/js/crm/common/common.js"></script>

<script type="text/javascript" src="/js/froala_editor.min.js"></script>
<script type="text/javascript" src="/js/froala_editor.pkgd.min.js"></script>
<script src="/js/bootstrapTableSelect.js"></script>
<script src="/js/crm/customerManager/user/customerDetailUser.js"></script>
<!-- 合同续费相关功能 -->
<script src="/js/crm/customerManager/user/customerDetailUserRenew.js"></script>
<script>
    let customerId_details=location.search.split('=')[1]
    function addContacts() {
        parent.$(parent.document).data('multitabs').create({
            iframe: true,
            title: '新增日志',
            url: "/front/workLog/addWorkLog?bs=1s&customerId_details="+customerId_details
        }, true);
    }


</script>
<script src="/js/crm/worklog/user/userWorkLogList.js" ></script>
</html>